package com.hxh.component.business.ui.bean;


import com.hxh.component.basicore.component.mvp.Mapper;

import java.util.ArrayList;
import java.util.List;


/**
 * Created by hxh on 2018/7/17.
 */

public class MyCutomerListDTO implements Mapper<List<MyCustomerVO>>{

    /**
     * total_count : 19
     * items : [{"id":"229705502131490816","is_open_account":"n","name":"无服务合同-gf","account":"","org_code":"","contact_name":"高飞","contact_mobile":"","contact_position":"","address":"金陵","source":"","industry":"","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"196282103912992768","tenant_id":"122371433052508160","created_at":1529568947,"updated_at":1529568947,"status":"active","biz_owner":"","service_owner":"","customer_tenant_id":"","brief_name":"服务","phone":"","email":"","province":"山东省","province_code":"370000","city":"滨州市","city_code":"371600","district":"阳信县","district_code":"371622","operation_logs":null},{"id":"224198014745448448","is_open_account":"n","name":"社保公积金公司-gf","account":"","org_code":"","contact_name":"高飞","contact_mobile":"13197674494","contact_position":"","address":"望京","source":"","industry":"","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"196282103912992768","tenant_id":"122371433052508160","created_at":1528255860,"updated_at":1528255860,"status":"active","biz_owner":"","service_owner":"","customer_tenant_id":"","brief_name":"社金","phone":"","email":"","province":"北京市","province_code":"110000","city":"市辖区","city_code":"110100","district":"朝阳区","district_code":"110105","operation_logs":null},{"id":"219617774157172736","is_open_account":"y","name":"公司地址测试","account":"","org_code":"","contact_name":"啦啦","contact_mobile":"13114704792","contact_position":"","address":"北中","source":"","industry":"","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"196282103912992768","tenant_id":"122371433052508160","created_at":1527163846,"updated_at":1527163846,"status":"active","biz_owner":"","service_owner":"","customer_tenant_id":"","brief_name":"地测","phone":"","email":"","province":"山东省","province_code":"370000","city":"滨州市","city_code":"371600","district":"滨城区","district_code":"371602","operation_logs":null},{"id":"216709186317193216","is_open_account":"n","name":"大众点评","account":"","org_code":"","contact_name":"大众","contact_mobile":"15678367486","contact_position":"网络管理员","address":"北京市朝阳区锐创国际","source":"推荐","industry":"网购","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"196282103912992768","tenant_id":"122371433052508160","created_at":1526470384,"updated_at":1526470384,"status":"active","biz_owner":"","service_owner":"","customer_tenant_id":"122371433052508160","brief_name":"大评","phone":"","email":"","province":"","province_code":"","city":"","city_code":"","district":"","district_code":"","operation_logs":null},{"id":"216709186208141312","is_open_account":"n","name":"摩托罗拉","account":"","org_code":"","contact_name":"摩托","contact_mobile":"15678367484","contact_position":"经理","address":"北京市海淀区东升科技园D3-407","source":"导入","industry":"通信","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"196282103912992768","tenant_id":"122371433052508160","created_at":1526470384,"updated_at":1526470384,"status":"active","biz_owner":"","service_owner":"","customer_tenant_id":"122371433052508160","brief_name":"摩拉","phone":"","email":"","province":"","province_code":"","city":"","city_code":"","district":"","district_code":"","operation_logs":null},{"id":"216709186245890048","is_open_account":"n","name":"美团","account":"","org_code":"","contact_name":"美","contact_mobile":"15678367485","contact_position":"派送员","address":"北京市朝阳区原创天地","source":"录入","industry":"网购","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"196282103912992768","tenant_id":"122371433052508160","created_at":1526470384,"updated_at":1526470384,"status":"active","biz_owner":"","service_owner":"","customer_tenant_id":"122371433052508160","brief_name":"美","phone":"","email":"","province":"","province_code":"","city":"","city_code":"","district":"","district_code":"","operation_logs":null},{"id":"214115245579309056","is_open_account":"y","name":"山东人力服务公司-gf","account":"","org_code":"","contact_name":"高飞客户","contact_mobile":"18041135370","contact_position":"","address":"望京","source":"","industry":"","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"196282103912992768","tenant_id":"122371433052508160","created_at":1525851941,"updated_at":1525851941,"status":"active","biz_owner":"","service_owner":"","customer_tenant_id":"","brief_name":"山服","phone":"","email":"","province":"北京市","province_code":"110000","city":"市辖区","city_code":"110100","district":"朝阳区","district_code":"110105","operation_logs":null},{"id":"212721426568843264","is_open_account":"y","name":"上海5月6日测试","account":"","org_code":"","contact_name":"谈华芳","contact_mobile":"13681250346","contact_position":"","address":"朝阳区","source":"","industry":"","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"99269474502316032","tenant_id":"122371433052508160","created_at":1525519628,"updated_at":1525519628,"status":"active","biz_owner":"","service_owner":"高飞","customer_tenant_id":"","brief_name":"上海5月6日测试","phone":"","email":"","province":"北京市","province_code":"110000","city":"市辖区","city_code":"110100","district":"朝阳区","district_code":"110105","operation_logs":null},{"id":"206504925549563904","is_open_account":"n","name":"中国地址","account":"","org_code":"","contact_name":"联系人255","contact_mobile":"18088881110","contact_position":"人力5","address":"北京市海淀区东升科技园6665555","source":"转介绍","industry":"高科技","extra":{"规模":"77555"},"introduction":"","images":null,"legal_entities":null,"created_by":"99269474502316032","tenant_id":"122371433052508160","created_at":1524037498,"updated_at":1524037498,"status":"","biz_owner":"王帅","service_owner":"高飞","customer_tenant_id":"","brief_name":"中国地址人力55","phone":"","email":"","province":"北京市","province_code":"110000","city":"市辖区","city_code":"110100","district":"东城区","district_code":"110101","operation_logs":null},{"id":"206502356819382272","is_open_account":"n","name":"7777","account":"","org_code":"","contact_name":"","contact_mobile":"13212341234","contact_position":"高飞","address":"北京市海淀区东升科技园","source":"","industry":"高飞","extra":null,"introduction":"","images":null,"legal_entities":null,"created_by":"99269474502316032","tenant_id":"122371433052508160","created_at":1524036886,"updated_at":1524036886,"status":"active","biz_owner":"高飞","service_owner":"高飞","customer_tenant_id":"","brief_name":"4","phone":"","email":"","province":"陕西省","province_code":"610000","city":"西安市","city_code":"610100","district":"新城区","district_code":"610102","operation_logs":null}]
     */

    private int total_count;
    private List<ItemsBean> items;

    public int getTotal_count() {
        return total_count;
    }

    public void setTotal_count(int total_count) {
        this.total_count = total_count;
    }

    public List<ItemsBean> getItems() {
        return items;
    }

    public void setItems(List<ItemsBean> items) {
        this.items = items;
    }

    @Override
    public List<MyCustomerVO> transform() {
        List<MyCustomerVO> vos = new ArrayList<>();

        for (ItemsBean item : items) {
            vos.add(item.transform());
        }
        return vos;
    }

    public static class ItemsBean implements Mapper<MyCustomerVO> {
        /**
         * id : 229705502131490816
         * is_open_account : n
         * name : 无服务合同-gf
         * account :
         * org_code :
         * contact_name : 高飞
         * contact_mobile :
         * contact_position :
         * address : 金陵
         * source :
         * industry :
         * extra : null
         * introduction :
         * images : null
         * legal_entities : null
         * created_by : 196282103912992768
         * tenant_id : 122371433052508160
         * created_at : 1529568947
         * updated_at : 1529568947
         * status : active
         * biz_owner :
         * service_owner :
         * customer_tenant_id :
         * brief_name : 服务
         * phone :
         * email :
         * province : 山东省
         * province_code : 370000
         * city : 滨州市
         * city_code : 371600
         * district : 阳信县
         * district_code : 371622
         * operation_logs : null
         */

        private String id;
        private String is_open_account;
        private String name;
        private String account;
        private String org_code;
        private String contact_name;
        private String contact_mobile;
        private String contact_position;
        private String address;
        private String source;
        private String industry;
        private Object extra;
        private String introduction;
        private Object images;
        private Object legal_entities;
        private String created_by;
        private String tenant_id;
        private int created_at;
        private int updated_at;
        private String status;
        private String biz_owner;
        private String service_owner;
        private String customer_tenant_id;
        private String brief_name;
        private String phone;
        private String email;
        private String province;
        private String province_code;
        private String city;
        private String city_code;
        private String district;
        private String district_code;
        private Object operation_logs;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getIs_open_account() {
            return is_open_account;
        }

        public void setIs_open_account(String is_open_account) {
            this.is_open_account = is_open_account;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }

        public String getOrg_code() {
            return org_code;
        }

        public void setOrg_code(String org_code) {
            this.org_code = org_code;
        }

        public String getContact_name() {
            return contact_name;
        }

        public void setContact_name(String contact_name) {
            this.contact_name = contact_name;
        }

        public String getContact_mobile() {
            return contact_mobile;
        }

        public void setContact_mobile(String contact_mobile) {
            this.contact_mobile = contact_mobile;
        }

        public String getContact_position() {
            return contact_position;
        }

        public void setContact_position(String contact_position) {
            this.contact_position = contact_position;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getSource() {
            return source;
        }

        public void setSource(String source) {
            this.source = source;
        }

        public String getIndustry() {
            return industry;
        }

        public void setIndustry(String industry) {
            this.industry = industry;
        }

        public Object getExtra() {
            return extra;
        }

        public void setExtra(Object extra) {
            this.extra = extra;
        }

        public String getIntroduction() {
            return introduction;
        }

        public void setIntroduction(String introduction) {
            this.introduction = introduction;
        }

        public Object getImages() {
            return images;
        }

        public void setImages(Object images) {
            this.images = images;
        }

        public Object getLegal_entities() {
            return legal_entities;
        }

        public void setLegal_entities(Object legal_entities) {
            this.legal_entities = legal_entities;
        }

        public String getCreated_by() {
            return created_by;
        }

        public void setCreated_by(String created_by) {
            this.created_by = created_by;
        }

        public String getTenant_id() {
            return tenant_id;
        }

        public void setTenant_id(String tenant_id) {
            this.tenant_id = tenant_id;
        }

        public int getCreated_at() {
            return created_at;
        }

        public void setCreated_at(int created_at) {
            this.created_at = created_at;
        }

        public int getUpdated_at() {
            return updated_at;
        }

        public void setUpdated_at(int updated_at) {
            this.updated_at = updated_at;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getBiz_owner() {
            return biz_owner;
        }

        public void setBiz_owner(String biz_owner) {
            this.biz_owner = biz_owner;
        }

        public String getService_owner() {
            return service_owner;
        }

        public void setService_owner(String service_owner) {
            this.service_owner = service_owner;
        }

        public String getCustomer_tenant_id() {
            return customer_tenant_id;
        }

        public void setCustomer_tenant_id(String customer_tenant_id) {
            this.customer_tenant_id = customer_tenant_id;
        }

        public String getBrief_name() {
            return brief_name;
        }

        public void setBrief_name(String brief_name) {
            this.brief_name = brief_name;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        public String getProvince_code() {
            return province_code;
        }

        public void setProvince_code(String province_code) {
            this.province_code = province_code;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getCity_code() {
            return city_code;
        }

        public void setCity_code(String city_code) {
            this.city_code = city_code;
        }

        public String getDistrict() {
            return district;
        }

        public void setDistrict(String district) {
            this.district = district;
        }

        public String getDistrict_code() {
            return district_code;
        }

        public void setDistrict_code(String district_code) {
            this.district_code = district_code;
        }

        public Object getOperation_logs() {
            return operation_logs;
        }

        public void setOperation_logs(Object operation_logs) {
            this.operation_logs = operation_logs;
        }

        @Override
        public MyCustomerVO transform() {
            MyCustomerVO vo = new MyCustomerVO();
            vo.name = name;
            vo.id = id;
            return vo;
        }
    }
}
